<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>buyfunshop</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
		<meta name="customer-service" />
		<meta name="promotion-tip" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta property="og:type"          content="website" />
		<meta property="og:title"         content="【buyfunshop】" />
		<meta property="og:description"   content="ช้อปปิ้งง่ายมาก! แพลตฟอร์มช้อปปิ้งที่เน้นผู้บริโภคแฟชั่นสตรี สินค้ามีทั้งเสื้อผ้าสตรีแฟชั่น รองเท้าผู้หญิง กระเป๋าสตรี เครื่องประดับ ฯลฯ จัดส่งฟรีเกิน 899/ดำเนินการเองอย่างเป็นทางการ/เก็บเงินปลายทาง/ระยะเวลาชื่นชมเจ็ดวัน " />
		<meta property="og:image"         content="//yinibuy2.oss-cn-hongkong.aliyuncs.com/729419af-b34f-4126-be31-e36aad7582dd.jpg" />
		<meta property="og:url"         content="www.buyfunshop.com" />		
		<link rel="stylesheet" href="../dists/mdui-0.4.3/css/mdui.css" />
		<link rel="stylesheet" href="../resources/css/animate.css"/>
		<link rel="stylesheet" href="../dists/swiper/css/swiper.css">
		<link rel="stylesheet" href="../resources/css/common.css"/>
		<style type="text/css">
			.top-nav-share{position: absolute; top: 0px; left: 0px; right: 0px; display: flex; z-index: 2; justify-content: space-between; box-sizing: border-box;padding: 8px 10px; max-width: 750px; margin: 0 auto;}
			.top-nav-share > a.top-mdui-btn{width: 32px; height: 32px; background: rgba(0, 0, 0, 0.3); border-radius: 50%; color: #FFF;box-sizing: border-box; padding: 4px;}
			
			.product-info > .product-text{background: #FFF; box-sizing: border-box; position: relative; padding: 4px 8px 12px 8px;}
			.product-info > .product-text > .price{padding: 8px 0px 8px;}
			.product-info > .product-text > .price > .salePrice{font-size: 24px; color: #9F0000; font-weight: 700;}
			.product-info > .product-text > .price > .salePrice i{font-size: 14px; font-style: normal; display: inline-block; padding: 0 2px;}
			.product-info > .product-text > .price > .originalPrice{font-size: 14px; color: #888888; text-decoration: line-through;}
			.originalPrice:before, .price>.originalPrice:before{font-size: 12px;}
			.product-info > .product-text > .price > .saleTag{border: 1px solid #ff4142;display: inline-flex;align-items: center;justify-content: center;border-radius: 4px;overflow: hidden;transform: translateY(-2px);border-top-left-radius: 0;}
			.product-info > .product-text > .price > .saleTag span{padding: 2px 2px 1px;font-size: 12px;}
			.product-info > .product-text > .price > .saleTag span:first-child{background: #ff4142;color: #FFF;}
			.product-info > .product-text > .price > .saleTag span:last-child{color: #ff4142;background: #fff;}
			.product-info > .product-text > .salesVolume{position: absolute; right: 12px; top: 20px; font-size: 12px; color: #999999;}
			.product-info > .product-text > .pId{position: fixed;right: 12px;top: 12px;font-size: 12px;color: #7B7B7B;background: #fff;z-index: 1;padding: 4px 6px;border-radius: 10px;opacity: .5;}
			.product-info > .product-text > .title > span.tags{background: #9F0000; display: inline-block; color: #FFFFFF; font-size: 11px;padding: 4px 8px;border-radius: 4px;}
			.product-info > .product-text > .title > span.txt{color: #222222; font-size: 16px; font-weight: bold; line-height: 20px;}
			.product-info > .product-text > .title > span.basicPrice{display: inline-block; font-size: 11px; color: #9F0000; /*border: 1px dashed #888888;*/ background: linear-gradient(90deg,#fbf3d7,#fcf0ca); padding: 4px 8px;}
			.product-info > .product-text > .desc{font-size: 13px; color: #7B7B7B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 8px;}
			
			.template-row-split{height: auto;width: 100%; position: relative; max-width: 100%;}
			.template-row-split > ul{width: 100%; display: flex; flex-flow: row nowrap; align-items: center;}
			.template-row-split > ul > li{flex: 1; text-align: center;}
			.template-row-split > ul > li > span.text{display: inline-block; width: 100%; text-align: center; font-size: 12px;color: #2A363B;}
			
			.product-service{background: #FFF; box-sizing: border-box; padding: 12px 0px 14px;}
			.template-module-title{height: 40px; line-height: 40px; display: flex; align-items: center; background: #FFF;padding: 0px 8px;}
			.template-module-title > span{font-size: 16px;font-weight: bold;}
			
			.template-module-product-list-horizontal > .flex-row{padding-top: 0px;}
			
			.product-details .product-details{margin-bottom: 50px;}
			.product-details .product-details > p{margin: -1px 0;display: grid;}
			.product-details .product-details > p > img, .product-details .product-details > p > a > img{width: 100% !important;}
			.product-details .product-details > p > video{width: 100% !important;object-fit: fill;}
			
			.bottom-menu{position: fixed; bottom: 0px; left: 0px; right: 0px;box-sizing: border-box; background: #FFFFFF; height: 48px; box-sizing: border-box; max-width: 750px; display: flex;margin: 0 auto;box-shadow: 0 0px 4px 0px #bbb;}
			.bottom-menu > ul{width: 100%; display: flex; flex-flow: row nowrap; align-items: center; height: 100%;}
			.bottom-menu > ul > li{flex: 1; height: 100%; box-sizing: border-box;}
			.bottom-menu > ul > li > a{display: inline-block;vertical-align: middle;box-sizing: border-box;margin: 10px;}
			.bottom-menu > ul > li img{width: 24px;margin-top: 12px;}
			.bottom-menu > ul > li button{margin: 0px;border-radius: 0;width: 96%; height: 42px; line-height: 42px;}
			.bottom-menu > ul > li:nth-child(1) svg,
			.bottom-menu > ul > li:nth-child(2) svg{opacity: .7;}
			.bottom-menu > ul > li:nth-child(2) > a{position: relative;}
			.bottom-menu > ul > li:nth-child(2) > a > i{position: absolute; right: calc(10% - 18px);bottom:25px; display: inline-block; width: 48px; height: 18px; background:#ED1400; font-size: 10px; text-align: center; line-height: 18px; border-radius: 20%; color: #FFF;font-style: normal;}
			.bottom-menu > ul > li:nth-child(3){flex: 3;display: flex; align-items: center; justify-content: flex-end;}
			.bottom-menu > ul > li:nth-child(4){flex: 2.5;display: flex; align-items: center;}
			.bottom-menu > ul > li #addToCart{background: linear-gradient(270deg,#ff911b,#ffad08); color: #FFF; font-size: 13px;border-bottom-left-radius: 21px;border-top-left-radius: 21px;}
			.bottom-menu > ul > li #buyNow{background: linear-gradient(270deg,#ff4142,#ff4b2b); color: #FFF; font-size: 13px;border-bottom-right-radius: 21px;border-top-right-radius: 21px;}
			
			.product-sku{position:fixed;bottom:0;z-index:20002;max-width:750px;min-height: 60%; max-height:80%;box-sizing: border-box; background: #FFFFFF; padding: 0px 8px 16px; width: 100%;display: flex;flex-direction: column;display: none; }
			.product-sku .product-sku-image{width: 80px; position: absolute; top: -28px; left: 8px;border-radius: 4px;border: 2px solid #fff;}
			.product-sku .product-sku-images{width: 100%; position: relative; height: 72px; min-height: 72px;}
			.product-sku .product-sku-images > .price > span.salePrice{position: absolute; top: 12px; left: 90px; color: #ff4142; font-weight: bold; font-size: 16px;}
			.product-sku .product-sku-images > span.sku-name{position: absolute; top: 40px; left: 90px; color: #000000; font-size: 13px;text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;}
			.product-sku .product-sku-images > button.mdui-btn-close{position: absolute; top: 0px; right: 0px;}
			.product-sku .product-sku-images > button.mdui-btn-close > i.mdui-icon{font-size: 18px; color: #363636;}
			.product-sku-boxs{overflow-y: auto; flex: 1;}
			.product-sku-box{margin-bottom: 16px;}
			.product-sku-box .title{color: #363636; font-weight: bold; margin-bottom: 8px; font-size: 12px;}
			.product-sku-box .sku-box .mdui-btn{background: #F5F5F5;color: #000; font-size: 12px; min-height: 26px !important; min-width: 56px; height: 26px; line-height: initial; padding: 0px 12px; margin-right: 8px; margin-bottom: 8px;border-radius: 12px;}
			.product-sku-box .sku-box .mdui-btn.active{background: #ff4142; color: #FFFFFF;}
			.product-sku-box .sku-box .mdui-btn.noInventory{opacity: 0.6;}
			
			.product-sku .product-num-box{margin-bottom: 16px;margin-top: 12px;}
			.product-sku .product-num-box > .title{color: #363636; font-weight: bold; margin-bottom: 8px; font-size: 12px;}
			.product-sku .product-num-box > .mdui-numbox{display: inline-block; position: relative; width: 100px; height: 28px; border-radius: 14px; color: #2A363B;overflow: hidden;}
			.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-btn{box-sizing: border-box; width: 28px; height: 28px; border: none; outline: 0; position: absolute; top: 0;background:#F5F5F5;}
			.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-btn > i.mdui-icon{font-size: 16px; color: #4B4B4B;}
			.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-btn.mdui-numbox-btn-minus {left: 0; border-right: 1px solid #FFF;}
			.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-btn.mdui-numbox-btn-plus {right: 0; border-left: 1px solid #FFF;}
			.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-input{font-size: 14px; width: 100%; height: 100%; margin: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; word-break: normal; border: none; outline: 0; padding: 0;background:#F6F6F6;}
			
			.product-sku > button.mdui-btn-block{background: linear-gradient(to right, #d4d4d4, #4c4c4c); color: #FFFFFF; border-radius: 20px;height: 40px;min-height: 40px; line-height: 40px;}
			.product-sku > button.mdui-btn-block.active{background: #ff4142; color: #FFFFFF; border-radius: 20px;height: 40px;min-height: 40px; line-height: 40px;}
			
			.product-recommend{background: #FFF; margin-top: 8px;}
			
			.template-module-product-list-horizontal-like{height: auto;width: 100%; background: #F5F5F5; box-sizing: border-box; display: none; flex-direction: row wrap;}
			.template-module-product-list-horizontal-like > ul{width: 100%;flex-flow: wrap;display: block;padding: 0;white-space: nowrap;overflow-x: scroll;}
		/* 	&::-webkit-scrollbar {display:none;} */

			.template-module-product-list-horizontal-like > ul > li{display: inline-block; box-sizing: border-box; padding: 4px; width: 38%;}
			.template-module-product-list-horizontal-like > ul > li > a{display: block; background: #FFF;text-decoration: none;}
			.template-module-product-list-horizontal-like > ul > li > a > div.image{border-radius:4px;}
			.template-module-product-list-horizontal-like > ul > li > a > div.image > img{width: 100%;height: calc((100% - 24px)/3);}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos{box-sizing: border-box; padding: 0px 8px 4px 8px; }
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.name{font-size: 15px; font-weight: 900; color: #444;text-align: left;  line-height: 24px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.describe{font-size: 12px; color: #bcbcbc;text-align: left;  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.tags{font-size: 8px; color: #ffad08; margin-top: 8px;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.tags > span{display: inline-block; border: 1px solid #ffad08; box-sizing: border-box; border-radius: 2px; padding: 2px 4px 1px 4px; margin-right: 4px;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.price{margin-top: 6px; position: relative;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.price > span.salePrice{color: #ff4142; font-size: 18px; font-weight: 600;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.price > span.originalPrice{color: #bcbcbc; font-size: 12px;text-decoration: line-through; margin-left: 2px;}
			.template-module-product-list-horizontal-like > ul > li > a > div.infos > div.price > span.salesVolume{position: absolute;right: 0px; bottom:3px;color: #bcbcbc;font-size: 10px;}
			
			.template-module-product-list-horizontal{height: auto;width: 100%; background: #F5F5F5; box-sizing: border-box; display: flex; flex-direction: row wrap;}
			.template-module-product-list-horizontal > .flex-row{height: auto;width: 100%; position: relative; max-width: 100%; box-sizing: border-box; display: flex; flex-flow: column wrap;}
			.template-module-product-list-horizontal > .flex-row > ul{width: 100%; display: flex; flex-direction: column; justify-content: space-between;}
			.template-module-product-list-horizontal > .flex-row > ul > li{display: block; box-sizing: border-box; padding: 4px; }
			.template-module-product-list-horizontal > .flex-row > ul > li > a{display: block; background: #FFF;text-decoration: none;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.image{border-radius:4px;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.image > img{width: 100%;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos{box-sizing: border-box; padding: 0px 8px 4px 8px; }
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.name{font-size: 13px; font-weight: 900; color: #444;text-align: left;  line-height: 24px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.describe{font-size: 12px; color: #bcbcbc;text-align: left;  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.tags{font-size: 8px; color: #ffad08; margin-top: 8px;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.tags > span{display: inline-block; border: 1px solid #ffad08; box-sizing: border-box; border-radius: 2px; padding: 2px 4px 1px 4px; margin-right: 4px;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.price{margin-top: 6px; position: relative;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.price > span.salePrice{color: #ff4142; font-size: 18px; font-weight: 600;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.price > span.originalPrice{color: #bcbcbc; font-size: 12px;text-decoration: line-through; margin-left: 2px;}
			.template-module-product-list-horizontal > .flex-row > ul > li > a > div.infos > div.price > span.salesVolume{position: absolute;right: 0px; bottom:3px;color: #bcbcbc;font-size: 10px;}
			
			#marketing-tag{position:absolute;height:28px;line-height:28px;top:-36px;width:max-content;background:#ff3450;font-size:12px;padding:0 6px;text-align:center;color:#fff;border-radius:4px; left: 20%;display: none;}
			#marketing-tag::after{position: absolute; border: 4px solid transparent; width: 0; height: 0; display: block; border-top: 4px solid #ff3450;content: '';}
		
			.mdui-card-row-container{display: none; padding: 4px 8px; background: #FFF; line-height: 36px; font-size: 13px; margin-top: 1px;}
			.mdui-card-row-container .left{width: 32px;}
			.mdui-card-row-container .center{flex-grow: 1; color: #F62931;padding: 0px 4px;}
			.mdui-card-row-container .rihgt{width: 32px; text-align: right; position: relative;}
			.mdui-card-row-container .rihgt svg{position: absolute; top: 6px; right: 0px;}
			
			.freight_policy .basicPrice{font-weight: bold; font-size: 120%;}
			.full_reduction_promotion .fullValue, .full_reduction_promotion .reductionValue{font-weight: bold; font-size: 120%;}
			.freight_policy, .full_reduction_promotion{font-size: 12px;padding: 4px 8px; background: #FFF;}
			
			.full_reduction_promotion .reduction-first{display: inline-block;  background: #9F0000; color: #FFFFFF; padding: 2px 8px; border-radius: 3px; margin-right: 4px;}
			.full_reduction_promotion .reduction-span{display: inline-block;  color: #9F0000; border: 1px solid #9F0000; padding: 2px 8px; border-radius: 3px; margin-right: 4px;}
			
			.swiper-slide video{width: 100%; height: 100vw; object-fit: cover;}
			
			.product-props-container{background: #FFF;padding: 0px 4%;max-height: 250px; overflow: hidden;position: relative;}
			.product-props-container .show-more{position: absolute; width: 100%; height: 30px; left: 0px; bottom: 0; line-height: 30px; text-align: center;color: #979797; background: #FFFFFF;padding: 8px 0px; cursor: pointer;}
			.product-props-container .show-more > span {border: 1px solid #DFDEDB; margin-top: 10px; color: #979797;line-height: 28px; padding: 4px 8px; font-size: 12px;}
			.product-props-container > .table{border-collapse: collapse; border-spacing: 0; clear: both; table-layout: inherit; width: 100%; font-size: 12px;  color: #363636;}
			.product-props-container > .table tr{border-bottom: 1px dashed #EDEDED;}
			.product-props-container table>tbody>tr>td{line-height: 18px; padding: 10px 10px 10px 0; font-size: 13px; text-align: left; word-wrap: break-word; word-break: break-all;}
			.product-props-container table>tbody>tr>td:first-child {color: #7B7B7B; width: 40%;}
			
			.product-bottom{display: flex;background: #FFF; font-size: 12px; text-align: center; padding: 16px 0px;}
			.product-bottom > span{flex-grow: 1;}
			.product-bottom > span > svg{width: 12px;vertical-align: bottom;}
			
			.customer-details{justify-content: center;}
			.customer-details > span:before,.customer-details > span:after{content: ' '; width: 100px;  height: 1px; display: inline-block;  background: #DDDDDD; margin: 0px 8px;}
			
			.msg .msg-freight{color: #9F0000; font-weight: bold; font-size: 13px; background: rgb(159 0 0 / 0.13); display: inline-block; border-radius: 9px; padding: 0px 4px;}
			.msg .msg-basicPrice{color: #A00000;font-weight: bold;}
			.msg-basicPrice:before{font-size: 14px; margin: 0px; margin-left: 4px;}
			
			.product-comments-container{background: #FFFFFF; display: flex; overflow-x: scroll; padding: 8px;}
			.product-comments-container .product-comments-item{width: 80%; height: 100px; max-width: 320px; min-width: 300px; display: flex; padding: 8px; background: #F5F5F4; border-radius: 4px; margin-right: 8px;}
			.product-comments-container .product-comments-item .product-comments-item-text{flex-grow: 1; display: flex; flex-direction: column;padding: 0px 4px;justify-content: space-between;}
			.product-comments-container .product-comments-item .product-comments-item-text span:first-child{font-size: 13px; color: #222222; line-height: 20px;overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;word-break: break-all;}
			.product-comments-container .product-comments-item .product-comments-item-text span:last-child{font-size: 10px; color: #666666;}
			.product-comments-container .product-comments-item .product-comments-item-text span:last-child > img{height: 24px;vertical-align: sub; margin-right: -4px; margin-left: -4px;}
			.product-comments-container .product-comments-item .product-comments-item-img{height: 100px; width: 100px; border-radius: 8px;}
			
			@media screen and (max-width: 720px) {
				.product-comments-container::-webkit-scrollbar {display:none;}
				.template-module-product-list-horizontal-like > ul::-webkit-scrollbar {display:none;}
			}
		</style>
	</head>
	
	<body class="mdui-container-fluid">
		
		<a id="tocart" href="../cart/index.html" style="display: none;"></a>
		
		<div class="top-nav-share">
			<a href="javascript:history.go(-1);" class="top-mdui-btn mdui-btn-back"><svg t="1587028723395" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7397" width="24" height="24"><path d="M641.28 278.613333l-45.226667-45.226666-278.634666 278.762666 278.613333 278.485334 45.248-45.269334-233.365333-233.237333z" p-id="7398" fill="#fff"></path></svg></a>
		</div>
		
		<div class="product-info">
			<div class="swiper-container">
				<div class="swiper-wrapper"></div>
				<div class="swiper-pagination"></div>
			</div>
			<div class="product-text"></div>
			
			<div class="full_reduction_promotion"></div>
			
			<div class="product-bottom">
				<span>
					<svg t="1595995582787" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1994"><path d="M928 832 896 832 896 384c0-70.4-57.6-128-128-128L576 256 576 192c0-70.4-57.6-128-128-128L192 64C121.6 64 64 121.6 64 192l0 640L32 832C14.08 832 0 846.08 0 864 0 881.92 14.08 896 32 896l896 0c17.92 0 32-14.08 32-32C960 846.08 945.92 832 928 832zM512 256l0 64 0 512L128 832 128 192c0-35.2 28.8-64 64-64l256 0c35.2 0 64 28.8 64 64L512 256zM832 832 576 832 576 320l192 0c35.2 0 64 28.8 64 64L832 832zM416 256l-192 0C206.08 256 192 270.08 192 288 192 305.92 206.08 320 224 320l192 0C433.92 320 448 305.92 448 288 448 270.08 433.92 256 416 256zM416 448l-192 0C206.08 448 192 462.08 192 480 192 497.92 206.08 512 224 512l192 0C433.92 512 448 497.92 448 480 448 462.08 433.92 448 416 448zM416 640l-192 0C206.08 640 192 654.08 192 672S206.08 704 224 704l192 0C433.92 704 448 689.92 448 672S433.92 640 416 640zM736 448l-64 0C654.08 448 640 462.08 640 480 640 497.92 654.08 512 672 512l64 0C753.92 512 768 497.92 768 480 768 462.08 753.92 448 736 448zM736 640l-64 0c-17.92 0-32 14.08-32 32s14.08 32 32 32l64 0c17.92 0 32-14.08 32-32S753.92 640 736 640z" p-id="1995"></path></svg>
					<label class="language" language="gczc"></label>
				</span>
				<span style="border-left: 1px solid #E5E5E5;border-right: 1px solid #E5E5E5;">
					<svg t="1595995717881" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5349"><path d="M510.544347 62.365396c-40.800241 0-80.450287 5.263887-118.947066 15.795754-38.495756 10.526751-74.198909 25.497721-107.105367 44.911886-32.906457 19.416212-63.175855 42.940998-90.818425 70.578452-27.637454 27.644617-51.000558 57.749262-70.082148 90.328261-19.087731 32.57286-34.0587 68.276013-44.918026 107.099227-10.860349 38.830377-16.286941 78.645175-16.286941 119.445416 0 60.544935 11.847839 118.456902 35.538401 173.73795 23.690562 55.280024 55.608505 102.989629 95.748714 143.134955 40.146349 40.145325 87.860047 72.059176 143.134955 95.753831 55.280024 23.690562 113.194038 35.534308 173.736926 35.534308 60.544935 0 118.457926-11.842723 173.73795-35.534308 55.280024-23.694655 102.989629-55.608505 143.134955-95.753831s72.059176-87.85493 95.753831-143.134955c23.690562-55.280024 35.534308-113.193015 35.534308-173.73795 0-48.697095-7.568373-95.91756-22.703071-141.656277-15.134699-45.736671-36.525891-86.865393-64.164369-123.392308-27.637454-36.519752-59.887972-68.602448-96.737228-96.246041-36.854373-27.637454-77.987189-49.02353-123.392308-64.164369C606.299201 69.932746 559.246559 62.365396 510.544347 62.365396L510.544347 62.365396zM510.544347 902.420991c-53.302997 0-104.140849-10.368138-152.507416-31.094182-48.375777-20.73116-89.995687-48.702212-124.879172-83.907015-34.877345-35.20992-62.677505-76.999698-83.409688-125.369336-20.73116-48.368614-31.093159-98.876961-31.093159-151.527089 0-71.070662 17.438161-136.719848 52.315506-196.930161 34.878368-60.216453 82.427314-107.766422 142.644791-142.644791 60.20929-34.877345 125.860523-52.315506 196.929138-52.315506 71.076802 0 136.719848 17.438161 196.937324 52.315506 60.216453 34.878368 107.761306 82.427314 142.638651 142.644791 34.882462 60.210313 52.321646 125.691677 52.321646 196.439998 0 70.742181-17.439184 136.223544-52.321646 196.438974-34.877345 60.216453-82.422198 107.925035-142.638651 143.134955C647.264195 884.818077 581.621149 902.420991 510.544347 902.420991L510.544347 902.420991zM684.282297 620.098997c8.55484 0 15.795754 2.303462 21.719674 6.91141 5.918803 4.602831 8.883321 10.526751 8.883321 17.766642 0 6.579859-3.128247 12.174274-9.379625 16.782222-6.251378 4.603855-13.326517 6.907317-21.222347 6.907317L535.223423 668.466588l0 82.918501c0 6.584975-2.794649 12.175297-8.391111 16.783245-5.591345 4.607948-12.994965 6.91141-22.211884 6.91141-8.553817 0-15.787568-2.303462-21.712511-6.91141-5.92392-4.607948-8.882298-10.199293-8.882298-16.783245l0-82.918501L324.964698 668.466588c-3.945869 0-7.731078-0.655939-11.349489-1.970888-3.621481-1.315972-6.748704-3.12927-9.380648-5.432733-2.631944-2.304486-4.771677-4.935406-6.415107-7.895831-1.648546-2.963495-2.468215-6.087649-2.468215-9.379625 0-6.579859 2.959402-12.175297 8.883321-16.778128 5.92392-4.607948 12.830213-6.91141 20.73116-6.91141l149.059897 0 0-72.059176L324.964698 548.038798c-8.55484 0-15.631002-2.304486-21.221324-6.912433-5.598508-4.607948-8.393157-10.531867-8.393157-17.766642 0-5.92392 2.959402-11.023054 8.883321-15.303544 5.92392-4.275373 12.830213-6.41613 20.73116-6.41613l126.350686 0-130.297578-191.503569c-3.955078-5.924943-4.608971-11.847839-1.977028-17.772782 2.631944-5.91778 8.227382-10.526751 16.784268-13.818727 6.579859-2.631944 13.817704-2.958378 21.713534-0.988514 7.900947 1.977028 13.817704 5.597485 17.772782 10.860349l131.286092 191.503569 129.316228-192.492082c2.63092-3.946892 6.250354-6.906294 10.858302-8.883321 4.603855-1.970888 9.53926-2.958378 14.807241-2.958378 5.263887 0 10.200316 0.98749 14.808264 2.958378 5.263887 1.977028 9.374508 4.608971 12.339026 7.900947 2.960425 3.28686 4.439102 6.907317 4.439102 10.853186 0 3.954055-0.98749 7.900947-2.959402 11.847839l0-0.98749L559.901475 501.641071l124.380822 0c3.946892 0 7.732102 0.491187 11.351536 1.479701 3.619434 0.98749 6.91141 2.631944 9.870812 4.935406 2.963495 2.303462 5.263887 4.935406 6.912433 7.899924 1.642406 2.959402 2.467191 6.087649 2.467191 9.374508 0 6.583952-2.963495 12.012591-8.883321 16.287965-5.92392 4.28049-13.163811 6.420223-21.719674 6.420223L535.223423 548.038798l0 72.059176L684.282297 620.097974 684.282297 620.098997zM684.282297 620.098997" p-id="5350"></path></svg>
					<label class="language" language="hdfk"></label>
				</span>
				<span>
					<svg t="1595995782728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6289"><path d="M890.88 158.72C752.64 151.04 616.96 94.72 563.2 25.6c-12.8-15.36-30.72-25.6-51.2-25.6s-38.4 10.24-51.2 25.6c-53.76 71.68-189.44 125.44-327.68 133.12h-23.04v432.64c0 138.24 74.24 268.8 194.56 337.92l125.44 71.68c25.6 15.36 53.76 23.04 81.92 23.04s56.32-7.68 81.92-23.04l125.44-71.68c120.32-69.12 194.56-199.68 194.56-337.92V158.72h-23.04z m-28.16 432.64c0 120.32-64 232.96-168.96 294.4l-125.44 71.68c-35.84 20.48-79.36 20.48-112.64 0l-125.44-71.68c-104.96-61.44-168.96-174.08-168.96-294.4v-384c145.92-12.8 281.6-71.68 340.48-151.04 5.12-5.12 7.68-5.12 10.24-5.12 2.56 0 5.12 0 10.24 5.12 61.44 79.36 197.12 138.24 340.48 151.04v384z" p-id="6290"></path><path d="M296.96 468.48c-10.24-10.24-25.6-10.24-35.84 0-10.24 10.24-10.24 25.6 0 35.84l194.56 186.88c5.12 5.12 10.24 7.68 17.92 7.68h2.56c7.68 0 12.8-2.56 17.92-10.24l271.36-327.68c10.24-10.24 7.68-28.16-2.56-35.84-10.24-10.24-28.16-7.68-35.84 2.56l-253.44 304.64-176.64-163.84z" p-id="6291"></path></svg>
					<label class="language" language="shwy"></label>
				</span>
			</div>
		</div>
		
		<div class="product-recommend mdui-m-t-1 you-like"></div>
		
		<div class="product-props"></div>
		
		<div class="product-details mdui-m-t-1"></div>
		
		<div class="product-recommend similar mdui-m-b-8"></div>
		
		<div class="bottom-menu">
			<ul>
				<li><a href="list.html"><svg t="1586933246590" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8037" width="28" height="28"><path d="M556.586667 159.36l288.490666 183.914667A64 64 0 0 1 874.666667 397.248v392.746667a64 64 0 0 1-64 64H555.456l0.021333-196.992H490.666667v196.992H234.666667a64 64 0 0 1-64-64v-398.293334a64 64 0 0 1 30.272-54.4l287.530666-178.346666a64 64 0 0 1 68.138667 0.426666zM810.666667 790.016V397.226667L522.197333 213.333333 234.666667 391.68v398.336h192v-197.013333h192.810666v196.992H810.666667z" p-id="8038" fill="#2A363B"></path></svg></a></li>
				<li><a onclick="customerCart.openCart();"><svg t="1586933455682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9017" width="28" height="28"><path d="M330.666667 768a53.333333 53.333333 0 1 1 0 106.666667 53.333333 53.333333 0 0 1 0-106.666667z m384 0a53.333333 53.333333 0 1 1 0 106.666667 53.333333 53.333333 0 0 1 0-106.666667zM94.762667 160h54.741333a96 96 0 0 1 92.906667 71.786667l1.024 4.394666L256.64 298.666667h0.213333l42.88 205.333333L332.224 661.333333h402.218667l61.653333-298.666666H313.813333l-13.376-64h495.68a64 64 0 0 1 62.677334 76.949333l-61.653334 298.666667A64 64 0 0 1 734.442667 725.333333H332.224a64 64 0 0 1-62.677333-51.050666l-60.586667-293.418667-0.405333 0.085333-27.733334-131.562666a32 32 0 0 0-28.309333-25.237334l-2.986667-0.149333H94.741333v-64h54.741334z" p-id="9018" fill="#2A363B"></path></svg></a><div id="marketing-tag" class="animated jello"></div></li>
				<li><button id="addToCart" class="mdui-btn language" language="jrgwc"></button></li>
				<li><button id="buyNow" class="mdui-btn language" language="ljgm"></button></li>
			</ul>
		</div>
		
		<div class="product-sku"></div>
	</body>
	
	<script src="../dists/mdui-0.4.3/js/mdui.js"></script>
	<script src="../dists/swiper/js/swiper.js"></script>
	<script src="../dists/art-template/template-web.js"></script>
	<script src="../resources/js/echo.js"></script>
	<script src="../resources/js/common.js"></script>
	<script>
	  !function(f,b,e,v,n,t,s)
	  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
	  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
	  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
	  n.queue=[];t=b.createElement(e);t.async=!0;
	  t.src=v;s=b.getElementsByTagName(e)[0];
	  s.parentNode.insertBefore(t,s)}(window, document,'script',
	  'https://connect.facebook.net/en_US/fbevents.js');
	  fbq('init', commonConfig.getFbPiexId());
	  fbq('track', 'PageView');
	</script>
	
	<script id="product-text" type="text/html">
		<div class="price">
			<span class="salePrice"><%=product.minPrice%></span>
			<span class="originalPrice"><%=product.originalPrice%></span>
		</div>
		<div class="salesVolume"><span><span class="language" language="hotsale"></span><%= $imports.buyCount(product.id)%></span></div>
		<div class="pId"><span>ID:<%= product.id%></span></div>
		<div class="title">
			<% if(product.tags.length > 0){ %>
				<% for (var i = 0; i < product.tags.length; i ++) { %>
				<span class="tags"><%= product.tags[i] %></span>
				<% } %>
			<% } %>
			<span class="txt"><%=product.title%></span>
		</div>
		<div class="desc"><%=product.description%></div>
	</script>
	<script id="template-module-product-list-horizontal-like" type="text/html">
		<div class="template-module-product-list-horizontal-like">
			<ul>
			<% for (var i = 0; i <aggregateModuleProducts.length; i++) { %>
				<li>
					<a href="../item/details.html?id=<%=aggregateModuleProducts[i].id%>">
						<div class="image"><img src="<%=aggregateModuleProducts[i].image%>" /></div>
						<div class="infos">
							<div class="name"><%=aggregateModuleProducts[i].title%></div>
							<div class="price">
								<span class="salePrice"><%=aggregateModuleProducts[i].price%></span>
								<span class="salesVolume"><span class="language" language="sales"></span><%= $imports.buyCount(aggregateModuleProducts[i].id)%></span>
							</div>
						</div>
					</a>
				</li>
			<% } %>
			</ul>
		</div>
	</script>
	<script id="template-module-product-list-horizontal" type="text/html">
		<div class="template-module-product-list-horizontal">
			<div class="flex-row">
				<ul>
				<% for (var i = 0; i < aggregateModuleProducts.length; i += 2) { %>
					<li>
						<a href="../item/details.html?id=<%=aggregateModuleProducts[i].id%>&utmsource=similer">
							<div class="image"><img src="../resources/img/placeholder.png" data-echo="<%=aggregateModuleProducts[i].image%>" /></div>
							<div class="infos">
								<div class="name"><%=aggregateModuleProducts[i].title%></div>
								<div class="describe"><%=aggregateModuleProducts[i].description%></div>
								<div class="price">
									<span class="salePrice"><%=aggregateModuleProducts[i].price%></span>
									<span class="originalPrice"><%=aggregateModuleProducts[i].originalPrice%></span>
									<span class="salesVolume">ขาย<%= $imports.buyCount(aggregateModuleProducts[i].id)%></span>
								</div>
							</div>
						</a>
					</li>
				<% } %>
				</ul>
			</div>
			<div class="flex-row">
				<ul>
				<% for (var i = 1; i < aggregateModuleProducts.length; i += 2) { %>
					<li>
						<a href="../item/details.html?id=<%=aggregateModuleProducts[i].id%>">
							<div class="image"><img src="../resources/img/placeholder.png" data-echo="<%=aggregateModuleProducts[i].image%>" /></div>
							<div class="infos">
								<div class="name"><%=aggregateModuleProducts[i].title%></div>
								<div class="describe"><%=aggregateModuleProducts[i].description%></div>
								<div class="price">
									<span class="salePrice"><%=aggregateModuleProducts[i].price%></span>
									<span class="originalPrice"><%=aggregateModuleProducts[i].originalPrice%></span>
									<span class="salesVolume">ขาย<%= $imports.buyCount(aggregateModuleProducts[i].id)%></span>
								</div>
							</div>
						</a>
					</li>
				<% } %>
				</ul>
			</div>
		</div>
	</script>
	<script id="product-sku" type="text/html">
		<img class="product-sku-image" src="<%=product.image%>"/>
		<div class="product-sku-images">
			<div class="price">
				<span class="salePrice"><%=product.price%></span>
			</div>
			<span class="sku-name language" language="qxzgg"></span>
			<button class="mdui-btn mdui-btn-icon mdui-ripple mdui-btn-close"><svg t="1587020841649" class="icon" viewBox="0 0 1045 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6538" width="20" height="20"><path d="M282.517333 213.376l-45.354666 45.162667L489.472 512 237.162667 765.461333l45.354666 45.162667L534.613333 557.354667l252.096 253.269333 45.354667-45.162667-252.288-253.44 252.288-253.482666-45.354667-45.162667L534.613333 466.624l-252.096-253.226667z" p-id="6539" fill="#8a8a8a"></path></svg></button>
		</div>
		<div class="product-sku-boxs">
			<% for (var i = 0; i < product.productAttributeApiDTOs.length; i++) { %>
			<div class="product-sku-box">
				<div class="title"><%=product.productAttributeApiDTOs[i].name%></div>
				<div class="sku-box">
					<% for (var j = 0; j < product.productAttributeApiDTOs[i].productAttributeValueApiDTOs.length; j++) { %>
					<button class="mdui-btn" dataid="<%=product.productAttributeApiDTOs[i].productAttributeValueApiDTOs[j].id%>"><%=product.productAttributeApiDTOs[i].productAttributeValueApiDTOs[j].value%></button>
					<% } %>
				</div>
			</div>	
			<% } %>
		</div>	
		<div class="product-num-box">
			<div class="title language" language="count"></div>
			<div class="mdui-numbox" data-numbox-step='1' data-numbox-min='1' data-numbox-max='999'>
				<button class="mdui-numbox-btn mdui-numbox-btn-minus"><i class="mdui-icon material-icons">remove</i></button>
				<input class="mdui-numbox-input" type="number" value="1" onfocus="this.blur()" readonly />
				<button class="mdui-numbox-btn mdui-numbox-btn-plus"><i class="mdui-icon material-icons">add</i></button>
			</div>
		</div>
		<button id="confirmSelected" class="mdui-btn mdui-btn-block language" language="qrxdbtn"></button>
	</script>
	<script>
		var app = {
			datas : {
				productId : tools.getURLParam('id'),
				source : tools.getURLParam('source'),
				utmsource: tools.getURLParam('utmsource'),
				productInfo : null,
				interval:null,
				sum:null
			},
			skus: {
				SKUResult: {},
				initSKU: function() {
					var i, j;
					for(i = 0; i < app.datas.productInfo.productSkuApiDTOs.length; i++) {
						var sku = app.datas.productInfo.productSkuApiDTOs[i];
						if(sku.inventory <= 0) continue;
			
						var skuKey = sku.code.substr(sku.code.indexOf('-') + 1); //一条SKU信息key
						var skuKeyAttrs = skuKey.split("-"); //SKU信息key属性值数组
						skuKeyAttrs.sort(function(value1, value2) {
							return parseInt(value1) - parseInt(value2);
						});
			
						//对每个SKU信息key属性值进行拆分组合
						var combArr = app.skus.combInArray(skuKeyAttrs);
						for(j = 0; j < combArr.length; j++) {
							app.skus.add2SKUResult(combArr[j], sku);
						}
			
						//结果集接放入SKUResult
						app.skus.SKUResult[skuKeyAttrs.join("-")] = sku;
					}
				},
				//把组合的key放入结果集SKUResult
				add2SKUResult: function(combArrItem, sku) {
					var key = combArrItem.join("-");
					if(!app.skus.SKUResult[key]) { //SKU信息key属性·
						app.skus.SKUResult[key] = sku;
					}
				},
				/**
				 * 从数组中生成指定长度的组合
				 * 方法: 先生成[0,1...]形式的数组, 然后根据0,1从原数组取元素，得到组合数组
				 */
				combInArray: function(aData) {
					if(!aData || !aData.length) {
						return [];
					}
			
					var len = aData.length;
					var aResult = [];
			
					for(var n = 1; n < len; n++) {
						var aaFlags = app.skus.getCombFlags(len, n);
						while(aaFlags.length) {
							var aFlag = aaFlags.shift();
							var aComb = [];
							for(var i = 0; i < len; i++) {
								aFlag[i] && aComb.push(aData[i]);
							}
							aResult.push(aComb);
						}
					}
					return aResult;
				},
				/**
				 * 得到从 m 元素中取 n 元素的所有组合
				 * 结果为[0,1...]形式的数组, 1表示选中，0表示不选
				 */
				getCombFlags: function(m, n) {
					if(!n || n < 1) {
						return [];
					}
			
					var aResult = [];
					var aFlag = [];
					var bNext = true;
					var i, j, iCnt1;
			
					for(i = 0; i < m; i++) {
						aFlag[i] = i < n ? 1 : 0;
					}
			
					aResult.push(aFlag.concat());
			
					while(bNext) {
						iCnt1 = 0;
						for(i = 0; i < m - 1; i++) {
							if(aFlag[i] == 1 && aFlag[i + 1] == 0) {
								for(j = 0; j < i; j++) {
									aFlag[j] = j < iCnt1 ? 1 : 0;
								}
								aFlag[i] = 0;
								aFlag[i + 1] = 1;
								var aTmp = aFlag.concat();
								aResult.push(aTmp);
								if(aTmp.slice(-n).join("").indexOf('0') == -1) {
									bNext = false;
								}
								break;
							}
							aFlag[i] == 1 && iCnt1++;
						}
					}
					return aResult;
				}
			},
			methods : {
				goHome : function(){
					mdui.snackbar({message: language.text('hao_xiang_zou_diu_le'),position: 'top'});
					setTimeout(function () {
					   window.location.href = 'list.html';
					}, 2000);
					return false;
				},
				initCustomerService: function(){
					_monitor.addMonitor({'eventAims':'PRODUCT_CUSTOM_SERVICE', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
					$$('#customer-service').attr('href' , 'https://m.me/'+ commonConfig.getCustomerIdByHost());
				},
				initProduct : function(){
					if(!app.datas.productId || app.datas.productId == '') app.methods.goHome();
					// tools.loading();
					$$.ajax({
						url : commonConfig.websitePrefix() + '/api/shop/product/' + app.datas.productId,
						success : function(result){
							if(result.code == 1){
								app.datas.productInfo = result.datas;
								app.methods.initProductActive();
								app.methods.initSwiper();
								app.methods.initProductText();
								app.methods.initProductSKU();
								app.methods.initMonitor();
								app.events.bindBottomMenuEvent();
								app.methods.initShoppingCart();
								app.methods.initService();
								//app.methods.selectDefaultSKU();
								app.methods.initPromotions();
								app.methods.initProductRecommend();
								app.methods.initProductDetails();
								app.methods.initProductProps();
								app.methods.initProductComments();
								
								var footMark = cacheLocalstorage.getCache('footMark');
								if(!footMark)footMark = [] ;
								
								var isContains = false ; 
								$$.each(footMark, function (index, tmp) {
									if(tmp.id == app.datas.productInfo.id) {
										isContains = true ;
										return false ; 
									}
								})
								if(!isContains)footMark.push(app.datas.productInfo);
								cacheLocalstorage.setCache('footMark' , footMark.slice(footMark.length - 20));
								
								globalization.render();
							}
						},
						error: function(xhr, textStatus) {
							if(xhr.status == 500 && JSON.parse(xhr.response) && JSON.parse(xhr.response).body && JSON.parse(xhr.response).body.message && JSON.parse(xhr.response).body.message == "No message available"){
								app.methods.goHome();
							}
						},complete: function(){tools.hideLoading();}
					});
				},
				initMonitor: function(){
					try{
						if(app.datas.utmsource == 'similer'){
							_monitor.addMonitor({'eventAims':'SIMILER_CLICK', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
						}
						
						_monitor.addMonitor({'eventAims': app.datas.productId, 'eventName': 'VIEW', 'aimsCategory': 'PRODUCT', 'hostName': window.location.hostname});
						
						
						var _fbgaparams = {
							content_name: app.datas.productInfo.title,
							content_category: 'default',
							content_ids: [app.datas.productInfo.id],
							content_type: 'product',
							value: app.datas.productInfo.price,
							currency: cacheSessionStorage.getCache('shopInfo').currencuy,
							contents: [{'id': app.datas.productInfo.id, 'quantity': 1}]
						};
						fbq('track', 'ViewContent', _fbgaparams);
					}catch(e){
						console.log(e);
					}
				},
				initProductActive : function(){
					if(app.datas.productInfo.status != 10 && app.datas.source != 'admin') {
						app.methods.goHome();
					}
				},
				initSwiper: function(){
					var swiperWrapperHtml = '';
					var carouselImages = app.datas.productInfo.carouselImages.split(';');
					$$.each(carouselImages, function(i, value) {
						swiperWrapperHtml += '<div class="swiper-slide"><img class="mdui-img-fluid" src="' + value + '"/></div>';
					});
					$$('.swiper-container .swiper-wrapper').html(swiperWrapperHtml);
					var mySwiper = new Swiper('.swiper-container', {
						loop: true,autoplay: true,pagination: {el: '.swiper-pagination'}
					})
				},
				initProductText : function(){
					// 格式化tag
					app.datas.productInfo.tags = (!app.datas.productInfo.tags || app.datas.productInfo.tags == '') ? [] : app.datas.productInfo.tags.trim().split(',')
					// 获取最大、小值
					var _productSkuApiDTOs = app.datas.productInfo.productSkuApiDTOs.filter((sku)=>{
						return sku.inventory > 0
					})
					_productSkuApiDTOs.sort((a,b)=>{
						return a.price - b.price
					})
					app.datas.productInfo['minPrice'] = _productSkuApiDTOs[0].price
					app.datas.productInfo['maxPrice'] = _productSkuApiDTOs[_productSkuApiDTOs.length - 1].price
					$$('.product-text').html(template('product-text', {'product': app.datas.productInfo, 'basicPrice': cacheSessionStorage.getCache('shopInfo').basicPrice}));
				},
				initProductSKU : function(){
					$$('.product-sku').html(template('product-sku', {'product': app.datas.productInfo}));
					app.skus.initSKU();
					if(app.datas.productInfo.productAttributeApiDTOs.length == 1) {
						app.events.handleSkuEnable();
					}
					app.events.initProductParams();
					app.events.initMduiNumbox();
					
				},
				initService : function(){
					$$('.product-service').show();
				},
				initProductRecommend : function(){
					
					if(app.datas.productInfo.likeProduct && app.datas.productInfo.likeProduct.length >= 3){
						
						if(app.datas.productInfo.likeProduct.length < 6) app.datas.productInfo.likeProduct = app.datas.productInfo.likeProduct.slice(0, 3);
						$$('.product-recommend.you-like').append('<div class="template-module-title"><span>'+ language.text('re_xiao_tui_jian') +'</span></div>');
						$$('.product-recommend.you-like').append(template('template-module-product-list-horizontal-like', {'aggregateModuleProducts': app.datas.productInfo.likeProduct}));
						$$('.template-module-product-list-horizontal-like').css('display', 'flex');
					}
					
					$$('.product-recommend.similar').append('<div class="template-module-title"><span class="language" language="cnxh"></span></div>');
					$$('.product-recommend.similar').append(template('template-module-product-list-horizontal', {'aggregateModuleProducts': app.datas.productInfo.similarProduct}));
					echo.init({offset: 667,throttle: 0});
				},
				initProductDetails : function(){
					$$('.product-details').append('<div class="template-module-title customer-details"><span class="language" language="spxq"></span></div>');
					$$('.product-details').append('<div class="product-details">'+app.datas.productInfo.productDetails+'</div>');
				},
				// product-props
				initProductProps: function(){
					if(app.datas.productInfo.productProps && app.datas.productInfo.productProps != ''){
						$$('.product-props').html('<div class="template-module-title"><span class="language" language="spcs"></span></div><div class="product-props-container">'+app.datas.productInfo.productProps+'<div class="show-more" onclick="app.methods.showAllProductProps()"><span class="language" language="ckqbcs"></span><div></div>');
					}
				},
				showAllProductProps: function(){
					$$('.product-props-container').css({ 'height': 'auto', 'maxHeight': 'initial' });
					$$('.product-props-container .show-more').hide();
				},
				initProductComments: function(){
					if(!app.datas.productInfo.productComments || !app.datas.productInfo.productComments.length  || app.datas.productInfo.productComments.length == 0)return;
					
					var _html = '<div class="product-comments mdui-m-t-1"><div class="template-module-title"><span>'+language.text("shang_pin_tui_jian")+'</span></div><ul class="product-comments-container">';
					$$.each(app.datas.productInfo.productComments, function(index, _comment) {
						if(_comment.images && _comment.images != ''){
							_html += `<li class="product-comments-item">
										<div class="product-comments-item-text">
											<span>${_comment.comments}</span>
											<span><img src="//yinibuy2.oss-cn-hongkong.aliyuncs.com/7a532e91-4d9f-4ddd-b9cf-f7b5f17475bd.png"/>${_comment.userName}&nbsp;&nbsp;&nbsp;${_comment.commentsAt}</span>
										</div>
										<img  class="product-comments-item-img" src="${_comment.images}" />
									</li>`;
						}else{
							_html += `<li class="product-comments-item">
										<div class="product-comments-item-text">
											<span>${_comment.comments}</span>
											<span><img src="//yinibuy2.oss-cn-hongkong.aliyuncs.com/7a532e91-4d9f-4ddd-b9cf-f7b5f17475bd.png"/>${_comment.userName}&nbsp;&nbsp;&nbsp;${_comment.commentsAt}</span>
										</div>
									</li>`;							
						}
					});
					
					_html += `</ul></div>`;
					
					//TODO
					$$('.product-props').before(_html);
				},
				getProductSku: function(){
					var skuCode = app.datas.productInfo.id;
					$$.each($$('.product-sku-box .sku-box .mdui-btn.active'), function(index, value) {
						skuCode += '-' + $$(value).attr('dataid');
					});
					var productSku = null;
					$$.each(app.datas.productInfo.productSkuApiDTOs, function(index, value) {
						if(value && value.code == skuCode) {
							productSku = value;
						}
					});
					return productSku;
				},
				handleBuyButton: function(){
					if($$('.product-sku-box .sku-box .mdui-btn.active').length != app.data.productInfo.productAttributeApiDTOs.length) {
						mdui.snackbar({message: language.text('qing_xuan_ze_chan_pin_gui_ge'),position: 'top',timeout: 1000});
						return;
					}
				},
				initShoppingCart : function(){
					$$('#marketing-tag').hide()
					// 计算距离满减
					var _basicPrice = cacheSessionStorage.getCache('shopInfo').basicPrice ; 
					var _fullReduction = cacheSessionStorage.getCache('shopInfo').fullReduction ; 
					
                    var _count = 0 ;
					var cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ;
                    $$.each(cartProducts, function(index, temp){
                        _count += parseInt(temp.quantity);
                    });
					var now=new Date().getTime();
					    if(localStorage.getItem('origTime')){
					        var old=localStorage.getItem('origTime');
					        var remainTime=(now - old)/1000;
					        //1199是设定的倒计时，
					        if(remainTime<=1199){
					            //剩下多少秒
					            _time= parseInt(1199-remainTime);
					        }else{
					            localStorage.setItem('origTime',now);
					            _time= 1199;
					        } 
					    }else{
					        localStorage.setItem('origTime',now);
					        _time= 1199;  
					    }
					var minute=parseInt(_time/60);
					var second=parseInt(_time%60);
					minute = minute < 10 ? "0" + minute : minute;
					second = second < 10 ? "0" + second : second;
					$$('.bottom-menu > ul > li:nth-child(2) > a').html('<svg t="1586933455682" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9017" width="28" height="28"><path d="M330.666667 768a53.333333 53.333333 0 1 1 0 106.666667 53.333333 53.333333 0 0 1 0-106.666667z m384 0a53.333333 53.333333 0 1 1 0 106.666667 53.333333 53.333333 0 0 1 0-106.666667zM94.762667 160h54.741333a96 96 0 0 1 92.906667 71.786667l1.024 4.394666L256.64 298.666667h0.213333l42.88 205.333333L332.224 661.333333h402.218667l61.653333-298.666666H313.813333l-13.376-64h495.68a64 64 0 0 1 62.677334 76.949333l-61.653334 298.666667A64 64 0 0 1 734.442667 725.333333H332.224a64 64 0 0 1-62.677333-51.050666l-60.586667-293.418667-0.405333 0.085333-27.733334-131.562666a32 32 0 0 0-28.309333-25.237334l-2.986667-0.149333H94.741333v-64h54.741334z" p-id="9018" fill="#2A363B"></path></svg>'+(_count > 0 ? '<i id="countdown">'+minute+':'+second+'</i>' : ''));
					var text = language.text('qcm') + _basicPrice + language.text('by') ;
					//购物车是否有商品
					if(_count > 0){
						for(var i = 0; i < _fullReduction.length; i++){
							if(_fullReduction[i].fullValue >= _basicPrice){
								text += ', ' + language.text('qcm') + _fullReduction[i].fullValue + language.text('reduce') +  _fullReduction[i].reductionValue;
							}
						}
						clearInterval(app.datas.interval)
						app.methods.CatCountDown();
					}			
					$$('#marketing-tag').html(text);
					setTimeout(function(){
						$$('#marketing-tag').show();
					}, 1000);
				},
				selectDefaultSKU: function(){
					var _skus = app.datas.productInfo.productSkuApiDTOs;
					$$.each(_skus, function(index, sku) {
						if(sku.inventory > 0) {
							var _attrs = sku.code.split('-').slice(1);
							$$.each(_attrs, function(index2, attr) {
								$$('.product-sku-box .sku-box .mdui-btn[dataid="' + attr + '"]').trigger('click');
							});
							return false;
						}
					});
				},
				initPromotions: function(){
					var _fullReduction = cacheSessionStorage.getCache('shopInfo').fullReduction;
					if(_fullReduction && _fullReduction.length > 0){
						var _html = '<span class="reduction-first language" language="xia_dan_li_jian"></span>' ;
						$$.each(_fullReduction, function(index, tmp) {
							_html += '<span class="reduction-span"><span class="language" language="qcm"></span>' + tmp.fullValue+'<span class="language" language="reduce"></span>' + tmp.reductionValue + '</span>'; 
						});
						$$('.full_reduction_promotion').html(_html);
						$$('.full_reduction_promotion').css('display', 'flex')
					}
				},
				closeCartDialog : function(){
					$$.hideOverlay();
					$$('.product-sku').css({
						display: 'none'
					});
				},
				openCartDialog : function(){
					$$.showOverlay();
					$$('.product-sku').css({
						display: 'flex'
					});
				},
		        CatCountDown:function(){
					var countdown=document.getElementById("countdown");
					var now=new Date().getTime();    
					if(localStorage.getItem('origTime')){
						var old=localStorage.getItem('origTime');
						var remainTime=(now - old)/1000;
						//1199是设定的倒计时，
						if(remainTime<=1199){
							//剩下多少秒
							time= parseInt(1199-remainTime);
						}else{
							localStorage.setItem('origTime',now);
							time= 1199;
						} 
					}else{
						localStorage.setItem('origTime',now);
						time= 1199;  
					}
						// var time=1199;
					app.datas.interval = setInterval(function(){
						time=time-1;
						localStorage.setItem("time", time)
						var minute=parseInt(time/60);
						var second=parseInt(time%60);
						minute = minute < 10 ? "0" + minute : minute;
						second = second < 10 ? "0" + second : second;
						countdown.innerHTML=minute+':'+second;
						if (minute == 0 && second == 0) {
							  $$('.bottom-menu > ul > li:nth-child(2) > a > i').css('display','none');
							  localStorage.removeItem('time')
						      clearInterval(app.datas.interval);
						      return;
			            }
					},1000);
							
				},
			},
			events : {
				handleSkuEnable : function(that){
					var selectedObjs = $$('.product-sku-box .sku-box .mdui-btn.active');
					if(selectedObjs.length){
						//获得组合key价格
						var selectedIds = [];
						$$.each(selectedObjs, function(i, value) {selectedIds.push($$(this).attr('dataid'))});
						selectedIds.sort(function(value1, value2) {return parseInt(value1) - parseInt(value2)});
						//用已选中的节点验证待测试节点 underTestObjs
						$$('.product-sku-box .sku-box .mdui-btn:not(.active)').each(function(i, element) {
							var siblingsSelectedObj = $$(this).siblings('.mdui-btn.active');
							var testAttrIds = []; //从选中节点中去掉选中的兄弟节点
							if(siblingsSelectedObj.length) {
								var siblingsSelectedObjId = siblingsSelectedObj.attr('dataid');
								for(var i = 0; i < selectedIds.length; i++) {
									(selectedIds[i] != siblingsSelectedObjId) && testAttrIds.push(selectedIds[i]);
								}
							} else {
								testAttrIds = selectedIds.concat();
							}
							testAttrIds = testAttrIds.concat($$(this).attr('dataid'));
							testAttrIds.sort(function(value1, value2) {return parseInt(value1) - parseInt(value2);});
							if(!app.skus.SKUResult[testAttrIds.join('-')]) {
								$$(this).addClass('noInventory').removeClass('active');
							} else {
								$$(this).removeClass('noInventory');
							}
						});
						$$('.product-sku-box .sku-box .mdui-btn.active').not(that).each(function(i, element) {
							if(!app.skus.SKUResult[selectedIds.join('-')]) {
								$$(this).addClass('noInventory');
							} else {
								$$(this).removeClass('noInventory');
							}
						});
					}else{
						$$('.product-sku-box .sku-box .mdui-btn').each(function(i, element) {
							app.skus.SKUResult[$$(this).attr('dataid')] ? $$(this).removeClass('noInventory') : $$(this).addClass('noInventory').removeClass('active');
						});
					}
				},
				initProductParams : function(){
					$$('.product-sku-box .sku-box .mdui-btn').on('click', function() {
						// 无库存
						$$(this).addClass('active').siblings().removeClass('active').removeClass('noInventory');
						app.events.handleSkuEnable($$(this));
						// 有无库存样式
						if($$(this).hasClass('noInventory')){
							$$('.product-sku > button.mdui-btn-block').removeClass('active').html(language.text('shou_qing'));
						}else{
							$$('.product-sku > button.mdui-btn-block').addClass('active').html(language.text('qrxdbtn'));
						}
						//需要设置是否启用confirmSelected按钮,判断的标准是,是否每一个属性都有被选择
						if($$('.product-sku-box .sku-box .mdui-btn.active').length == app.datas.productInfo.productAttributeApiDTOs.length) {
							app.events.bindConfirmBtnEvent();
							//处理选中后的结果信息
							var productSku = app.methods.getProductSku();
							if(productSku) {
								$$('.product-sku .product-sku-images > span.sku-name').html(language.text('yi_xuan') + productSku.name);
								$$('.product-sku img.product-sku-image').attr('src', productSku.image);
								// 處理價格
								$$('.product-sku .product-sku-images > .price > span.salePrice').data('skuPrice', productSku.price).html(productSku.price.toFixed());
							}
						} else {
							$$('.product-sku > button.mdui-btn-block').removeClass('active');
						}
					});
				},
				bindBottomMenuEvent : function(){
					$$('#addToCart').off('click').on('click', function(e) {
						app.datas.clickType = 'btn-add-cart';
						app.methods.openCartDialog();
					});
					// 购买 -> 确认
					$$('#buyNow').off('click').on('click', function(e) {
						app.datas.clickType = 'btn-buy-now';
						app.methods.openCartDialog();
					});
					$$('.product-sku .product-sku-images > button.mdui-btn-close').off('click').on('click', function(e) {
						app.methods.closeCartDialog();
					});
				},
				bindConfirmBtnEvent : function(){
					var _sku = app.methods.getProductSku();
					if(_sku.inventory <= 0) {
						$$('#confirmSelected').off('click');
						return false;
					}
					$$('#confirmSelected').off('click').on('click', function(e) {
						if(app.datas.productInfo.status == 10) {
							//在这里需要区分立即购买和加入购物车
							var _product = {
								"checked": true,
								"productId": app.datas.productInfo.id,
								"productTitle": app.datas.productInfo.title,
								"productSkuId": _sku.id,
								"productSkuCode": _sku.code,
								"productSkuBarcode": _sku.barcode,
								"productSkuName": _sku.name,
								"productPrice": _sku.price,
								"originalProductPrice": app.datas.productInfo.originalPrice,
								"quantity": $$('.product-sku .product-num-box > .mdui-numbox > .mdui-numbox-input').val(),
								"productImageUrl": _sku.productImageUrl
							};
							
							if(app.datas.clickType == 'btn-add-cart'){
								var cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ; 
								var hashSelected = false;
								$$.each(cartProducts, function(index, temp){
									if(temp.productSkuId == _product.productSkuId){
										temp.quantity = parseInt(temp.quantity) + parseInt(_product.quantity);
										hashSelected = true;
									}
								});
								if(!hashSelected)cartProducts.unshift(_product);
								
								cacheLocalstorage.setCache('cartProducts', cartProducts);
								app.methods.closeCartDialog();
								localStorage.removeItem("origTime")
								app.methods.initShoppingCart();
								mdui.snackbar({message: language.text('tian_jia_gou_wu_che_cheng_gong'),position: 'bottom',timeout:1500},function(){localStorage.removeItem('time')});
								
								customerCart.openCart();
								
								try{
									_monitor.addMonitor({'eventAims': _product.productId, 'eventName': 'ADD_TO_CART', 'aimsCategory': 'PRODUCT', 'hostName': window.location.hostname});
									var _fbgaparams = {
										content_ids: [_product.productId],
										content_name: _product.productTitle,
										content_type: 'product',
										currency: cacheSessionStorage.getCache('shopInfo').currencuy,
										value: parseFloat(_product.productPrice) * parseInt(_product.quantity),
										contents: [{'id': _product.productId, 'quantity': _product.quantity}]
									}
									fbq('track', 'AddToCart', _fbgaparams);
								}catch(e){
									console.log(e);
								}
								
							}else if(app.datas.clickType == 'btn-buy-now'){								
								try{
									
									var cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ; 
									$$.each(cartProducts, function(index, temp){
										temp.checked = false;
									});
									cacheLocalstorage.setCache('cartProducts', cartProducts);
									
									app.methods.closeCartDialog();
									cacheLocalstorage.setCache('buynowCartProducts', [_product]);
									
									_monitor.addMonitor({'eventAims': _product.productId, 'eventName': 'BUY_NOW', 'aimsCategory': 'PRODUCT', 'hostName': window.location.hostname});
									var _fbgaparams = {
										content_category: 'default',
										content_ids: [_product.productId],
										contents: [{'id': _product.productId, 'quantity': _product.quantity}],
										currency: cacheSessionStorage.getCache('shopInfo').currencuy,
										num_items: _product.quantity,
										value: parseFloat(_product.productPrice) * parseInt(_product.quantity)
									}
									fbq('track', 'AddToCart', _fbgaparams);
								}catch(e){
									console.log(e);
								}
								
								setTimeout(function () {
							     	//customerCart.openCart();
							     	window.location.href = '../cart/index.html';
							    }, 500);
							}
						} else {
							mdui.snackbar({message: language.text('shang_pin_wei_shang_jia'),position: 'bottom'});
							app.methods.goHome();
						}
					});
				},
				initMduiNumbox: function() {
					$$('.mdui-numbox-btn-minus').on('click', function() {
						var value = parseInt($$(this).next().val()) - parseInt($$(this).parent().attr('data-numbox-step'));
						if(value < parseInt($$(this).parent().attr('data-numbox-min'))) {
							value = $$(this).parent().attr('data-numbox-min')
						}
						$$(this).next().val(value);
					});
					$$('.mdui-numbox-btn-plus').on('click', function(e) {
						var value = parseInt($$(this).prev().val()) + parseInt($$(this).parent().attr('data-numbox-step'));
						if(value > parseInt($$(this).parent().attr('data-numbox-max'))) {
							value = $$(this).parent().attr('data-numbox-max');
						}
						$$(this).prev().val(value);
					});
				}
			},
			init : function(){
				app.methods.initProduct();
			}
		}
		$$(function(){
			app.init();
		});
	</script>
</html>
